<template>
	<div class="about">
		<h1>This is an about page</h1>
		<p> 我是vuex里state里的 num ===> {{$store.state.num}}</p>
		<p> 我是vuex里state里的 txt ===> {{$store.state.txt}}</p>
		<p>我是vuex里映射过来的 ===> {txt}}</p>
		<p>我是vuex里映射过来的getters ====> {{www}}</p>
		<button @click="qq">我执行的修改方法来自vuex里映射过来的方法 ===> 修改数据</button>
	</div>
</template>
<script>
	import {
		mapState,
		mapActions,
		mapMutations,
		mapGetters
	} from 'vuex'
	export default {
		methods: {
			...mapMutations(["fixnum", "fixtxt"]),
			...mapActions(["queryData"]),
			qq() {
				this.fixnum()
				this.fixtxt("666")
				this.queryData(555)
			}
		},
		computed: {
			...mapState(["num", "txt", "arr", "obj"]),
			...mapGetters(["www"])
		}
	}
</script>
